import request from "@/utils/request";
import request3 from '@/utils/request3'
// import request2 from '@/utils/request2'

  // 获取市场每日销量
export function fetchMarketDailySales(id, year, month, day){
    const formData = new FormData()
    formData.append('id', id)
    formData.append('year', year)
    formData.append('month', month)
    formData.append('day', day)
    const data = formData
    return request3({
      url: '/aggs/market/dailySales',
      method: 'post',
      data
    })
  }
  // 交易小时数据
export function hourlyHistogram(id, year, month, day) {
  const formData = new FormData()
  formData.append('id', id)
  formData.append('year', year)
  formData.append('month', month)
  formData.append('day', day)
  const data = formData
    return request3({
      url: "/aggs/market/hourlyHistogram",
      method: "post",
      data
    });
  }

   // 菜品销量走势
export function weight_trend(data) {
    return request({
      url: "/api/v1/government/data_screen/weight_trend",
      method: "post",
      data
    });
  }